package com.hhl.test02.service;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hhl.test02.dao.UserMapper02;

@Service
public class UserServiceTest02 {
	@Autowired
	UserMapper02 userMapper02;
	
	//回滚当前记录
	@Transactional
	public String addMybatisUser02(String name,Integer age){
		userMapper02.insert(name, age);
		int i = 1/0;
		return "success";
	}
}
